﻿<%@ Page Title="Home Page" Language="vb" MasterPageFile="~/Site.Master" AutoEventWireup="false"
    CodeBehind="PhoneList.aspx.vb" Inherits="Nokia_Smartphones._Default" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <h2>
        &nbsp;
         <td width="10%">
        <a href="../RSS.aspx"><img class="RSSlogo" src="../Pictures/rss.jpg" /></a>
    </td></h2>
    <br />
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
    DataKeyNames="ID" DataSourceID="PhonesDB" AllowSorting="True" 
        BackColor="White" BorderColor="#336666" BorderStyle="Double" BorderWidth="3px" 
        CellPadding="4" GridLines="Horizontal" HorizontalAlign="Center" 
        AllowPaging="True" PageSize="5">
    <Columns>
        <asp:BoundField DataField="Brand" HeaderText="Brand" SortExpression="Brand" />
<asp:BoundField DataField="Model_Number" HeaderText="Model Number" 
            SortExpression="Model_Number"></asp:BoundField>
        <asp:BoundField DataField="Year_Make" HeaderText="Year Make" 
            SortExpression="Year_Make" />
        <asp:HyperLinkField DataNavigateUrlFields="GSM_URL" 
            DataNavigateUrlFormatString="{0}" DataTextField="Model_Number" 
            HeaderText="More Info" />
        <asp:HyperLinkField DataNavigateUrlFields="PostCode" 
            DataNavigateUrlFormatString="http://maps.google.co.uk/?q={0}" 
            DataTextField="PostCode" HeaderText="Retail Store" />
            <asp:TemplateField HeaderText="Picture">
                <ItemTemplate>
                    <asp:HyperLink ID="HyperLink10" runat="server" NavigateUrl='<%# Eval("ID", "~/AddComments.aspx?ID={0}") %>'>
                    <asp:Image CssClass="phoneImage"  ID="Image1" runat="server" ImageUrl='<%# Eval("Picture") %>' />
                    </asp:HyperLink>
                </ItemTemplate>
                <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
            </asp:TemplateField>
    </Columns>
    <FooterStyle BackColor="White" ForeColor="#333333" />
    <HeaderStyle BackColor="#336666" Font-Bold="True" ForeColor="White" />
    <PagerStyle BackColor="#336666" ForeColor="White" HorizontalAlign="Center" />
    <RowStyle BackColor="White" ForeColor="#333333" />
    <SelectedRowStyle BackColor="#339966" Font-Bold="True" ForeColor="White" />
    <SortedAscendingCellStyle BackColor="#F7F7F7" />
    <SortedAscendingHeaderStyle BackColor="#487575" />
    <SortedDescendingCellStyle BackColor="#E5E5E5" />
    <SortedDescendingHeaderStyle BackColor="#275353" />
</asp:GridView>
<asp:SqlDataSource ID="PhonesDB" runat="server" 
    ConnectionString="<%$ ConnectionStrings:PhonesConn %>" 
    ProviderName="<%$ ConnectionStrings:PhonesConn.ProviderName %>" 
    SelectCommand="SELECT * FROM [Phones]"></asp:SqlDataSource>
    <br />
    <br />
    <br />



    


    <br />
</asp:Content>
